<?

//检查表格是否存在，不存在则插入
//+++++++++++++++++++++++++++++++++++++++++++++++++

if(!check_table_is_exist($dbName,$table_Prefix."setting_email"))
{
//如果不存在，应该需要sql新建一个数据表。才能兼容没有这个表的网站。

    $parameter['table']       = $table_Prefix."setting_email";
    $parameter['custom_type'] = "varchar(225),varchar(225),varchar(225),varchar(225),varchar(225)";
    $parameter['custom_item'] = "email,smtp_account,smtp_password,smtp_host,smtp_port";
    $query = mysql_query(creat_table($parameter)) or die ("error:".mysql_error());

}




//检查表格项目======================================
//+++++++++++++++++++++++++++++++++++++++++++++++++

//update_exists('`'.$dbName.'`.`'.$table_Prefix."login_admin`" , '`weixin_send`' , 1);//检查表是否有这个字段  如果没有自动生成

//生成发邮件用的用户名
update_exists('`'.$dbName.'`.`'.$table_Prefix."employee`" , '`mail_sender`' , 1);

//增加通知黑名单
update_exists('`'.$dbName.'`.`'.$table_Prefix."setting`" , '`notice_black_list`' , 1);


//增加抄送名单
update_exists('`'.$dbName.'`.`'.$table_Prefix."setting`" , '`carbon_copy_list`' , 1);


//增加企业邮箱部分
update_exists('`'.$dbName.'`.`'.$table_Prefix."setting_email`" , '`email`' , 1);
update_exists('`'.$dbName.'`.`'.$table_Prefix."setting_email`" , '`smtp_account`' , 1);
update_exists('`'.$dbName.'`.`'.$table_Prefix."setting_email`" , '`smtp_password`' , 1);
update_exists('`'.$dbName.'`.`'.$table_Prefix."setting_email`" , '`smtp_password`' , 1);
update_exists('`'.$dbName.'`.`'.$table_Prefix."setting_email`" , '`smtp_host`' , 1);

update_exists('`'.$dbName.'`.`'.$table_Prefix."setting_email`" , '`smtp_port`' , 1);


//客户部分
update_exists('`'.$dbName.'`.`'.$table_Prefix."member`" , '`work_email`' , 1);
update_exists('`'.$dbName.'`.`'.$table_Prefix."member`" , '`country`' , 1);

//留言部分
update_exists('`'.$dbName.'`.`'.$table_Prefix."member_contact_log`" , '`website`' , 1);


//字段修改
//+++++++++++++++++++++++++++++++++++++++++++++++++
//
//mysql_query("ALTER TABLE ".$table_Prefix."detail CHANGE `introduce2` `introduce2` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
//mysql_query("ALTER TABLE ".$table_Prefix."detail CHANGE `introduce3` `introduce3` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
//mysql_query("ALTER TABLE ".$table_Prefix."detail CHANGE `detail2` `detail2` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
//mysql_query("ALTER TABLE ".$table_Prefix."detail CHANGE `detail3` `detail3` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");


?>